label: Properly calculate half the height
authorTimm Bäder <mail@baedert.org>
Mon, 20 Mar 2017 16:20:12 +0000 (17:20 +0100)
committerTimm Bäder <mail@baedert.org>
Mon, 20 Mar 2017 16:20:12 +0000 (17:20 +0100)
Since we compare it to a double anyway, might as well divide by 2.0.

gtk/gtklabel.c

index 268f9c84de24b92f7c8a6ce069cf43053207bf07..54676ecff2f0e9ea7e2c940cbf8bc3208101a276 100644 (file)
@@ -3406,7 +3406,7 @@ gtk_label_update_layout_width (GtkLabel *label)
 
               x0 = width / 2;
               y0 = dx ? x0 * dy / dx : G_MAXDOUBLE;
-              vertical = fabs (y0) > height / 2;
+              vertical = fabs (y0) > height / 2.0;
 
               if (vertical)
                 {